<?php 
class indexAction extends sfAction{
	public function execute($request){
		$this->getResponse()->setContentType('image/jpeg');
		$ranString = '123456789';
		$len = strlen($ranString);
		$length = 6;
		$captcha = '';
		for($i = 0; $i < $length; $i++) {
			$captcha .= $ranString{rand(0,$len-1)};
		}
		$g = new AntiSpam($captcha);
		CaptchaHelper::setCaptcha($captcha);
		echo $this->renderText($g->Stroke());
		
	}
}